#include "widget.h"
#include "ui_widget.h"
#include <QListView>
#include <QTreeView>
#include <QTextEdit>
#include <QResizeEvent>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    m_pSpliter = new QSplitter(this);
    m_pSpliter->setHandleWidth(1);
    m_pSpliter->setFixedSize(this->size());
    m_pSpliter->setOrientation(Qt::Vertical);
    QListView *listview = new QListView;
    listview->setMinimumHeight(50);
    QTreeView *treeview = new QTreeView;
    treeview->setMinimumHeight(50);
    QTextEdit *textedit = new QTextEdit;
    m_pSpliter->addWidget(listview);
    m_pSpliter->addWidget(treeview);
    m_pSpliter->addWidget(textedit);

    m_pSpliter->setCollapsible(0,false);
    m_pSpliter->setCollapsible(1,false);
    m_pSpliter->setCollapsible(2,false);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::resizeEvent(QResizeEvent *event)
{
    m_pSpliter->setFixedSize(event->size());

}

